package com.ying.user.controller;

import com.ying.common.entity.Response;
import com.ying.user.entity.MmPermission;
import com.ying.user.service.MmPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.function.Function;

@RestController
@RequestMapping(value = "/mmPermission")
public class MmPermissionController {

    @Autowired
    private MmPermissionService mmPermissionService;

    @PostMapping(value = "/add")
    public Response add(@RequestBody MmPermission mmPermission) {
        Function<MmPermission, Response> add = mmPermissionService.add();
        return add.apply(mmPermission);
    }

}
